import Vue from "vue";
import VueRouter from "vue-router";
import Index from "@/views/index.vue";
import Divice from "@/views/divice.vue";
import Ordered from "@/views/ordered.vue";
import Mine from "@/views/mine.vue";
import OsIndex from "../views/osIndex";
import OsHuodon from "../views/osHuodon.vue";
import OsCount from "@/views/osCount.vue";
Vue.use(VueRouter);

const router = new VueRouter({
  routes: [
    { path: "/", redirect: "/index" },
    { path: "/index", component: Index },
    { path: "/divice", component: Divice },
    {
      path: "/ordered",
      component: Ordered,
      children: [
        {
          path: "osindex",
          component: OsIndex,
        },
        {
          path: "oshuodon",
          component: OsHuodon,
        },
        {
          path: "oscount",
          component: OsCount,
        },
      ],
    },
    { path: "/mine", component: Mine },
  ],
});

export default router;
